﻿CREATE Procedure [dbo].[sh_Debug_Print]
	(
		@Lable varchar(255),
		@Value0 varchar(8000)=null,
		@Value1 varchar(8000)=null,
		@Value2 varchar(8000)=null,
		@Value3 varchar(8000)=null
	)
As

IF dbo.RegistryValue('DebugMode') <> 'on' RETURN

SET @Lable = REPLACE(@Lable,'$0',ISNULL(@Value0,'Null'))
SET @Lable = REPLACE(@Lable,'$1',ISNULL(@Value1,'Null'))
SET @Lable = REPLACE(@Lable,'$2',ISNULL(@Value2,'Null'))
SET @Lable = REPLACE(@Lable,'$3',ISNULL(@Value3,'Null'))

PRINT CONVERT(varchar,GETDATE(),108)+' : '+@Lable




